<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="{$contextPath}/pas/easyui/themes/{$page_theme | default: 'default'}/easyui.css">
    <link rel="stylesheet" type="text/css" href="{$contextPath}/pas/easyui/themes/icon.css">
    <link rel="stylesheet" type="text/css" href="{$contextPath}/pas/style/my.css">
    
    <script type="text/javascript" src="{$contextPath}/pas/easyui/jquery.min.js"></script>
    <script type="text/javascript" src="{$contextPath}/pas/easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="{$contextPath}/pas/javascript/my.js"></script>
    
</head>
<body onpageshow="resetPagination('dg')">
    {datagrid id="dg" datasource="/flow/FlowService/findAll.do" view="f_flow" }
    {form id="dlg" view="f_flow" }
    
    <script>
	events_combobox_onselect.business_type = function (rec) {
        getFormItem('dlg', 'current_flow_def').combobox('reload', '/flow/FlowDefinitionService/findAll.do?$value=rows&business_type='+rec.config_value);
	}
    field_formatters.status=function (value, row, index){
    	if(value == 9) {
    		return "<font color='green'>已发布</font>";
    	} else if(value == 8) {
    		return "<font color='red'>已禁用</font>";
    	} else {
    		return "待发布";
    	}
    }
    field_formatters.scope=function (value, row, index){
    	if(value == 0) {
    		return "全局有效";
    	} else {
    		return "机构专有";
    	}
    }
    field_formatters.version=function (value, row, index){
    	return "VER:" + "<strong>"+value+"</strong>";
    }
    </script>
</body>
</html>